/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package argtrust.logic;

import java.lang.Cloneable;
import java.util.List;


import aima.core.logic.fol.parsing.ast.FOLNode;
import aima.core.logic.fol.parsing.FOLVisitor;

/**
 * Sentence (formula) to express the knowledge.
 * As a temporarily solution, the AIMA implementation is employed,
 * and being interface to through this Sentence class.
 * TODO:
 *  1) Replace all direct references to AIMA sentence to MySentence.
 *  2) Look for more efficient/convenient implementation.
 * @author Yuqing Tang
 */
public class MySentence {

    protected Object mImpl;

    public MySentence() {
    }

    public MySentence(Object impl) {
        mImpl = impl;
    }

    public MySentence(MySentence orig)  throws CloneNotSupportedException{
            mImpl = MySentenceOperators.clone(orig.mImpl);
    }

  
    ///////////////////////////////////
    //For aima Sentence interface

    @Override
    public MySentence clone()  throws CloneNotSupportedException {
        return new MySentence(this);
    }
    ////////////////////////////////////

//
//    public FOLNode copy();
    /////////////////////////////////////

    /////////////////////////////////////
    //Hash
    @Override
    public int hashCode() {
        return mImpl.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }

        final MySentence rhs = (MySentence) obj;
        return mImpl.equals(rhs.mImpl);
    }
    /////////////////////////////////////
}
